/*
 * @Author: byron
 * @Date: 2021-11-13 21:06:04
 * @LastEditTime: 2022-02-08 01:09:38
 */
import {
    request
} from '@/utils/axios'

export const getArticles = (params) => request({
    url: `/articles`,
    method: 'get',
    params
}, {
    loading: false
})

export const getArticle = (id) => request({
    url: `/articles/blog/${id}`,
    method: 'get'
}, {
    loading: true
})
export const queryArticle = (data) => request({
    url: `/articles/queryBlog`,
    method: 'post',
    data
}, {
    loading: true
})
export const queryArchives = (data) => request({
    url: `/articles/archives`,
    method: 'post',
    data
}, {
    loading: true
})
export const queryByCateTag = (data) => request({
    url: `/articles/queryChoice`,
    method: 'post',
    data
}, {
    loading: true
})

// 搜索文章
// export const queryArticle = (data) => request.post(`/articles/queryBlog`, data)

// export const queryArchives = (data) => request.post(`/articles/archives`, data)